/**
 * @Date 2025/3/31 9:23
 * @Created by 衡盛永
 */

package cn.itcast.demo.esdemo.controllers;

import cn.itcast.demo.esdemo.entity.HeimaHotel;
import cn.itcast.demo.esdemo.mapper.HeimaHotelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/es")
public class HeimaHotelController {

    @Autowired
    private HeimaHotelMapper heimaHotelMapper;

    @GetMapping("/hotels")
    public void getHeimaHotels() {
        List<HeimaHotel> heimaHotelList = heimaHotelMapper.selectList(null);
        System.out.println("heimaHotelList:" + heimaHotelList);
    }
}
